'use client'

import {useState} from 'react'
import {invoke} from '@tauri-apps/api/tauri'

export default function Greet() {
    const [data, setData] = useState("");
    invoke<string>('test1', {name: 'Next.js'})
        .then(res => {
            console.log(res)
            setData(res)
        })
        .catch(console.error)

    return <>greet page: {data}</>
}